﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<% 
    BIZ.WebInfomationPublishOper ipo = new BIZ.WebInfomationPublishOper();  
%>
<!--main-->
<div class="main study_mian_box w_980 clearfix">
	<div class="study_main clearfix">
        <!--left-->
        <% 
            Html.RenderPartial("~/Views/Shared/VipcenterLeft.ascx");
        %>
        <!--right-->
        <div class="study_right">
        	<h3>校内公告</h3>
            <!--main-->
            <div class="news_list_box">
            <% 
                int pageno = Request["pageno"] == null ? 1 : int.Parse(Request["pageno"].ToString());//当前页
                int pagesize = 15;//单页记录数
                int count = 0;//总记录数
                int pageNumber = 0;//总页数   
                IList lixszd = ipo.getlistweb(pageno, pagesize, (int)DAL.webEnums.template.学员俱乐部_校内公告);    
                if(lixszd.Count>0)
                {
            %>
                <ul class="news_list_ul">
                <% 
                    foreach (Hashtable tb in lixszd)
                    {
                        if (tb["total"] == null)
                        {
                %>
                    <li><a target="_blank" href="/vipcenter/xnggdetail.html?id=<%=tb["Wi_id"] %>">·<%=tb["Wi_title0"]%></a><span>[<%=DateTime.Parse(tb["Wi_addTime"].ToString()).ToString("yyyy-MM-dd")%>]</span></li>
                <% 
                        }
                        else
                            count = (tb["total"] == null ? 0 : int.Parse(tb["total"].ToString()));
                    }
                %>
                </ul>
                <% 
                }    
                %>
                <!--pager-->
        <div class="pager">
        <%
            pageNumber = ((count % pagesize) == 0 ? (count / pagesize) : ((count / pagesize) + 1));
            int start = pagesize * (pageno - 1) + 1;
            if (start < 0)
                start = 0;
            int end = (start + pagesize-1);
            if (pageno == pageNumber)
            {
                if ((count % pagesize) != 0)
                {
                    end = (start + (count % pagesize) - 1);
                }
            }
        %>
            <p class="left"><%=count%> 条记录，显示第 <%=start %> 条 - 第 <%=end %> 条记录</p>
            <p class="right"><a href="/vipcenter/xngg.html?pageno=1" title="首页" class="a1 a1_n"></a>
            <a href="/vipcenter/xngg.html?pageno=<%=(pageno==1?1:pageno-1) %>" title="上一页" class="a2"></a><span>第<b><%=pageno %></b>页/共 <%=pageNumber %> 页</span>
            <a href="/vipcenter/xngg.html?pageno=<%=(pageno==pageNumber?pageNumber:pageno+1) %>" title="下一页" class="a3"></a><a href="/vipcenter/xngg.html?pageno=<%=pageNumber %>" title="末页" class="a4"></a>
            <select id="sPage">
            <% 
                for (int k = 1; k <= pageNumber;k++ )
                    Response.Write("<option value=\"" + k.ToString() + "\">" + k.ToString() + "</option>");
            %>
            </select></p>
            <script type="text/javascript" language="javascript">
                $(function () {
                    $("#sPage").val(<%=pageno %>);
                    $("#sPage").change(function () {
                        window.location.href = "/vipcenter/xngg.html?pageno=" + $("#sPage").val();
                    });
                })
            </script>
        </div>
            </div>
        </div>
    </div>
    <div class="bottom_bg"></div>
</div>


</asp:Content>
